import request from '@/utils/request.js'

export const queryAllDeptsApi =()=>{
    return request.get('/depts')
}
export const addDeptApi=(dept)=>{
    return request.post('/depts',dept)
}
export const queryDeptByIdApi=(id)=>{
    return request.get(`/depts/${id}`)
}
export const updateByIdApi=(dept )=>{
    return request.put('/depts',dept)
}
export const deleteByIDApi=(id)=>{
    return request.delete(`/depts?id=${id}`)
}